/**
 * 当前浏览器名称
 *
 * @return {[type]} [description]
 */
export const getExplorer = () => {
	const ua = window.navigator.userAgent
	const isExplorer = (exp) => {
		return ua.includes(exp)
	}
	if (isExplorer('MSIE')) return 'IE'
	else if (isExplorer('Firefox')) return 'Firefox'
	else if (isExplorer('Chrome')) return 'Chrome'
	else if (isExplorer('Opera')) return 'Opera'
	else if (isExplorer('Safari')) return 'Safari'
}

/* 判断是PC还是移动端 */
export const isPC = () => {
	let Agents = new Array("Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod");  
	for (var v = 0; v < Agents.length; v++) {  
		if (navigator.userAgent.includes(Agents[v])) { 
			return false
			/* if(window.innerHeight>document.body.clientWidth){	//屏幕方向检测
				alert('横屏浏览效果会更佳哦！')
			} */
			break; 
		}else{
			return true
		} 
	}
}